#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int Size(int* arr)
{
	int n, flag=1;
	char c;
	for (n = 0; flag &&scanf("%d%c", arr + n, &c) != EOF; n++)
	{			
		if (c == '\n')
			flag = 0;
	} 		
	return n;
}

int Sum(int* arr, int n)
{
	int sum = 0;
	for (int i = 0; i < n; i++)
		sum += arr[i];
	return sum;
}

int main()
{
	int a[1024];
	int n,k=1;
	while ((n = Size(a)) != 0)
	{
		printf("Case %d: %d, %d\n", k++, n, Sum(a, n));
	}
	return 0;
}